<?php 
class KToolBar{
	private $ToolBar;
	private $count = 0;
	
	function __construct(){
		$this->ToolBar = "";
		$this->ToolBar .= "<table border=\"0\" cellspacing=\"2\"><tr>";
	}
	
	public function addLink($link_string){
		$this->ToolBar .= "<td>".$link_string."</td>";
		$this->count += 1;
	}
	
	public function getToolBar(){
		$this->ToolBar .= "</tr></table>";
		$this->ToolBar = $this->count > 0 ? $this->ToolBar : '';
		$this->ToolBar = addslashes($this->ToolBar);
		return $this->ToolBar;
	}
}
?>